package com.scy.boot04test04.mapper;

import com.scy.boot04test04.entity.Friend;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface FriendMapper {

    @Insert("insert into friend values(null,#{name},#{gender},#{rel})")
    void insert(Friend friend);

    @Select("select * from friend")
    List<Friend> select();

    @Delete("delete from friend where id=#{id}")
    void delete(int id);

    @Update("update friend set name=#{name},gender=#{gender},rel=#{rel} where id=#{id}")
    void update(Friend friend);
}
